/***************************************************************************
 *   KShootout - online shootout card game.                                *
 *   Copyright (C) 2008, 2009  MacJariel                                   *
 *                                                                         *
 *   KShootout is free software: you can redistribute it and/or modify     *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation, either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   KShootout is distributed in the hope that it will be useful,          *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with KShootout.  If not, see <http://www.gnu.org/licenses/>.    *
 ***************************************************************************/
#ifndef __MAINWINDOW_H__
#define __MAINWINDOW_H__

#include <QMainWindow>
#include <QList>
class QStackedLayout;

namespace Ui {
    class MainWindow;
}

namespace client {
    class Application;
    class ChatWidget;
    class LogWidget;
    class IMainWindowContent;

    /**
    * The MainWindow class represent the main window of the client.
    */
    class MainWindow: public QMainWindow
    {
        Q_OBJECT;
    public:
        MainWindow();
        virtual ~MainWindow();

    public slots:
        /// Shows a dialog with warning message. This method doesn't block
        /// the thread, instead schedules showing modal dialog window.
        /// @todo This method does not belong here. Let's think of better place.
        void showWarningMessage(const QString& message);

        /// Sets new interface
        void setMainWidget(QWidget* widget);

#if 0
    private slots:
        /// Shows the connect to server dialog.
        void showConnectToServerDialog();

        /// Shows the create game dialog.
        void showCreateGameDialog();

        /// Shows the join game dialog.
        void showJoinGameDialog();

        /// Shows the about dialog.
        void showAboutDialog();

        /// Shows the options dialog.
        void showOptionsDialog();

        /// Updates actions
        void updateActions();

    protected:
        virtual void paintEvent(QPaintEvent* event);

    private:
        void createActions();
#endif
    private:
        Ui::MainWindow*     mp_ui;
        QStackedLayout*     mp_stackedLayout;
    };
}
#endif // __MAINWINDOW_H__
